/*
* params arr 需要参数验证的数组
* params $this 当前的实例
*/
var requiredFun = function (arr, $this){
  for (let i = 0, len = arr.length; i < len; i++) {
    if (parseInt($this[arr[i][0]]) !== 0 && !$this[arr[i][0]]) {
      return { state: false, msg: arr[i][1] };
    }
  }
  return { state:true };
}

module.exports = {
  requiredFun: requiredFun
}